package com.carleasoft.mps.cms.business.train.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.carleasoft.mps.cms.business.train.bean.entity.TrainPlan;
import com.carleasoft.mps.cms.business.train.bean.po.DeptInfoVos;
import com.carleasoft.mps.cms.business.train.bean.po.ReviewAndTrainingPo;
import com.carleasoft.mps.cms.business.train.bean.po.TrainPlanPageQueryPo;
import com.carleasoft.mps.cms.business.train.bean.vo.DeptVo;
import com.carleasoft.mps.cms.business.train.bean.vo.TrainArchiveVo;
import com.carleasoft.mps.cms.business.train.bean.vo.TrainPlanVo;
import com.carleasoft.mps.cms.business.train.bean.vo.UserVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.HashMap;
import java.util.List;
import java.util.Set;

/**
 * <p>
 * 训练计划主题表 Mapper 接口
 * </p>
 *
 * @author fan
 * @since 2023-05-17
 */
@Mapper
public interface TrainPlanMapper extends BaseMapper<TrainPlan> {
    /**
     * 训练计划-分页查询
     */
    Page<TrainPlanVo> pageQuery(Page page,@Param("param") TrainPlanPageQueryPo trainPlanPageQueryPo);
    /**
     * 训练计划-分页查询(门户不需要token)
     */
    Page<TrainPlanVo> doorPageQuery(Page page,@Param("param") TrainPlanPageQueryPo trainPlanPageQueryPo);
    /**
     * 查询所有人员
     */
    List<UserVo> getPersonMap();
    /**
     * 根据部门编码获取部门信息
     */
    HashMap<String,String> getDeptByCode(@Param("code") String code);
    /**
     * 查询所有部门
     */
    List<DeptVo> getDept();
    /**
     *训练计划-查询各种计划（查六条）
     */
    List<TrainPlan> queryPlan(@Param("trainType") Integer trainType);
    /**
     * 训练计划统计
     */
    List<HashMap<String,Object>> planStatistics(@Param("year") String year);
    /**
     * 用车情况统计
     */
    List<HashMap<String,Object>> byCarStatistics(@Param("year") String year);
    /**
     * 工作台-内容较审&训练档案待办
     */
    Page<HashMap<String,Object>> reviewAndTraining(Page page,@Param("po") ReviewAndTrainingPo reviewAndTrainingPo,@Param("userCode")String userCode);
    /**
     * 统计分析-训练档案-训练计划统计
     */
    List<HashMap<String,Object>> trainingArchivesPlanStatistics();

    List<DeptInfoVos> userInfo(@Param("userNames") Set<String> userNames);
}
